#include <iostream>
#include <string>
#include <vector>
//
// Created by lingzhitech on 25-9-16.
//
int main() {
    std::vector< std::string> svec; // empty vector
    std::cout << svec[0] << std::endl; // run-time error: there are no elements in svec!
    std::cout << svec.at(0) << std::endl; // throws an out_of_range exception
    std::cout << svec.front() << std::endl;// run-time error: there are no elements in svec!
    std::cout << *svec.begin() << std::endl;// run-time error: there are no elements in svec!
}